﻿using Health.Code;
using Health.Domain;
using Health.WebAPI.Wirte.Applicant.Command;
using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace Health.WebAPI.Wirte.Controllers
{
    /// <summary>
    /// 健康咨询-读
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class HealthingController : ControllerBase
    {
        IMediator mediator;

        public HealthingController(IMediator mediator)
        {
            this.mediator = mediator;
        }

        /// <summary>
        /// 反填健康栏目信息
        /// </summary>
        /// <param name="fantian"></param>
        /// <returns></returns>
        [HttpGet]
        public Task<APIRestl<List<Column>>> FanHealth([FromQuery] FantianCommand fantian)
        {
            return mediator.Send(fantian);
        }
        /// <summary>
        /// 反填就医指南
        /// </summary>
        /// <param name="fantian"></param>
        /// <returns></returns>
        [HttpGet]
        public Task<APIRestl<List<MedicalGuide>>> FanMedical([FromQuery] MedicalGuidFanCommand fantian)
        {
            return mediator.Send(fantian);
        }
    }
}
